package top.coolrainly.module.pb.controller.admin.user.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.validator.constraints.Length;

import java.util.*;
import javax.validation.constraints.*;

@Schema(description = "管理后台 - 用户信息新增/修改 Request VO")
@Data
public class MemberUserSaveReqVO {

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10283")
    private Long id;

    @Schema(description = "姓名", example = "王五")
    @NotNull(message = "姓名不能为空")
    private String name;

    @Schema(description = "所属组织", requiredMode = Schema.RequiredMode.REQUIRED, example = "6535")
    @NotNull(message = "所属组织不能为空")
    private Long orgId;

    @Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @NotEmpty(message = "用户账号不能为空")
    private String username;

    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
    @Length(min = 4, max = 32, message = "密码长度为 4-32 位")
    private String password;

}